package org.blogwu.learn.designpattern.chapter14.v4;

import java.math.BigDecimal;
import java.text.MessageFormat;

/**
 * 具体课程
 */
public class SpecificCourse extends Course {

    private BigDecimal bigDecimal;

    public SpecificCourse(String name) {
        super(name);
    }

    @Override
    public void addCourse(Course course) {
        System.out.println("不支持此操作");
    }

    @Override
    public void showCourseInfo() {
        System.out.println(MessageFormat.format("课程名称：{0},价格为:{1} ", this.name, this.bigDecimal));
    }

    @Override
    public void setPrice(BigDecimal bigDecimal) {
        this.bigDecimal = bigDecimal;
    }
}
